<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SOP</title>
<link href="resources/styles/main.css" rel="stylesheet" type="text/css" />
<link type="text/css" href="resources/scripts/jquery-ui-1.8.14.custom/css/start/jquery-ui-1.8.14.custom.css" rel="stylesheet" />
<script type="text/javascript" src="resources/scripts/jquery-ui-1.8.14.custom/js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="resources/scripts/jquery-ui-1.8.14.custom/js/jquery-ui-1.8.14.custom.min.js"></script>
<script type="text/javascript" src="resources/scripts/jquery-ui-1.8.14.custom/js/jquery.blockUI.js"></script>
<script type="text/javascript" src="resources/scripts/datepicker-CN.js"></script>
<script type="text/javascript">

function checkFields()
{
	if($('#cdate').val()=='')
	{
		alert('请选择日期');
		return false;
	}
	return true;
}

$(document).ready(function(){
	
	var success = '<!--{$success}-->';
	if(success=='1')
		alert('提交成功');
	
	$('#dialogResetConfirm').dialog({ 
			autoOpen: false,
	 		model: true,
			buttons:
				{
					'是': function(){ $('#schoolWeekForm')[0].reset(); $(this).dialog('close');},
					'否': function(){ $(this).dialog('close');}
				}
	})
	
	$( "#cdate" ).datepicker();
	
	$('.submitForm').click(function(){
			if(!checkFields())
			{
				return false;
			}
			$('#schoolWeekForm').submit();
	});
	
	$("#cdate").change(function(){
			window.location.href="<!--{spUrl c=unit_school a=index}-->"+"&cdate="+$('#cdate').val()+"&part="+$('#part').val();
	});
	
	$("#part").change(function(){
			window.location.href="<!--{spUrl c=unit_school a=index}-->"+"&cdate="+$('#cdate').val()+"&part="+$('#part').val();
	});
			
	$('#repwdMy').dialog({ 
	autoOpen: false,
	buttons: {
			"提交": function() {
					if(!checkUsername($('#oldpwdMy').val()))
					{
						$('#errMsgRepwdMy').html('密码不能为空');
						return;
					}
					if(!(checkUsername($('#repwdInputMy').val())))
					{
						$('#errMsgRepwdMy').html('密码不能为空');
						return;
					}
					if($('#repwdInputMy').val() != $('#repwdInputConfirmMy').val())
					{
						$('#errMsgRepwdMy').html('密码和确认密码不一致');
						return;
					}
					$('#errMsgRepwdMy').html('<span style="color: green;"></span>');
					$.post(
						'<!--{spUrl c=main a=changeMyPwd}-->',
						{
							'oldpwd': $('#oldpwdMy').val(),
							'pwd': $('#repwdInputMy').val(),
							'selectedUser' : "<!--{$user.id}-->"
						},
						function(data) {
							if(data == -1)
							{
								$('#errMsgRepwdMy').html('密码错误');
								return;
							}
							alert('密码修改成功');
							window.location.reload();
						}
					);
				},
			"关闭": function() {
					$(this).dialog('close');
				}
		}
	});
	
	$('.repwdLinkMy').click(function(){
		$('#repwdMy').dialog('open');
		return false;
	});
	
		
	$('.resetForm').click(function(){
		$('#dialogResetConfirm').dialog('open');
	});
	
});
</script>
<style>
div.ui-datepicker {
	font-size:10px;
}
</style>
</head>

<body>
<div id="dialogResetConfirm" title="重置表单" style="display: none;">
	<p>是否要重置整个表单？（恢复填入之前的操作，并非清空表单。）</p>
</div>
<div id="repwdMy" style="width: 320px; height: 240px; display:none;">
  <form method="POST">
    <table>
      <tr>
      	<td colspan="2"><span style="color: #900; " id="errMsgRepwdMy"></span></td>
      </tr>
      <tr>
        <td>旧密码：</td>
        <td><input id="oldpwdMy" type="password" name="oldpwdMy"/></td>
      </tr>
      <tr>
        <td>新密码：</td>
        <td><input id="repwdInputMy" type="password" name="repwdInputMy" /></td>
      </tr>
      <tr>
        <td>重复新密码：</td>
        <td><input id="repwdInputConfirmMy" type="password" name="repwdInputConfirmMy" /></td>
      </tr>
    </table>
  </form>
</div>
<table width="100%" height="316" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="63" valign="top" background="resources/images/bgc10.gif" style="padding:30px 0px 0px 35px"><table width="93%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><table border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td bgcolor="#8ac281" class="b06"><!--{$school.schoolname}--></td>
                <td><img src="resources/images/bgc11.gif" width="26" height="52" /></td>
              </tr>
            </table></td>
          <td align="right"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="23" align="right"><span class="b05"> 您好， </span><span class="b07"><!--{$school.schoolname}--></span><span class="b05"> 上次登录：</span><span class="b16"><!--{$user.last_login_date}--> </span><span class="b05">[<a href="<!--{spUrl c=main a=logout}-->">安全登出</a>]  [<a href="#" class="repwdLinkMy">密码修改</a>] </span></td>
              </tr>
              <tr>
                <td height="28" align="right" valign="bottom"><span class="b05"><a href="<!--{spUrl c=unit_import a=index}-->"> <img src="resources/images//c11.gif" width="97" height="21" /></a></span></td>
              </tr>
              <!--
            <tr>
              <td height="28" align="right" valign="bottom"><span class="b05"><img src="resources/images/c12.gif" width="97" height="21" /> <img src="resources/images/c11.gif" width="97" height="21" /></span></td>
            
            </tr>-->
            
            </table></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td background="resources/images/bgc02.gif"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:5px">
        <tr>
          <td height="40" colspan="2"><img src="resources/images/bgc05.gif" align="absmiddle" /><span class="b01">信息录入</span></td>
        </tr>
        <tr>
          <td width="56%" height="1" background="resources/images/bgc04.gif"></td>
          <td width="44%" background="resources/images/bgc04.gif"></td>
        </tr>
      </table>
      <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" background="resources/images/bgc08.gif" style="margin:25px auto 15px auto">
        <tr>
          <td height="32" style="padding-left:15px"><table border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><table border="0" cellpadding="0" cellspacing="0" class="b02">
                    <tr>
                      <td><a href="#">学校·周活动</a></td>
                    </tr>
                  </table></td>
                <td><table border="0" cellpadding="0" cellspacing="0" class="b03">
                    <tr>
                      <td><a href="<!--{spUrl c=unit_school a=month}-->">学校·月活动</a></td>
                    </tr>
                  </table></td>
                <td><table border="0" cellpadding="0" cellspacing="0" class="b03">
                    <tr>
                      <td><a href="<!--{spUrl c=unit_school a=classes}-->">班级管理</a></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table>
      <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td style="padding-left:15px"><span class="b05"><strong>学校·周活动</strong> 最后更新：</span><span class="b10">2011</span><span class="b05"> 年</span><span class="b10">12 </span><span class="b05">月</span><span class="b10">13</span><span class="b05"> 日</span></td>
          <td align="right" style="padding-left:15px"><a href="<!--{spUrl c=export_tables a=index}-->"><img src="resources/images/cj125.gif" align="absmiddle" /></a></td>
        </tr>
      </table>
      <form action="<!--{spUrl c=unit_school a=postWeek}-->" method="POST" id="schoolWeekForm">
        <table border="0" align="center" cellpadding="0" cellspacing="0" style="margin:15px auto 25px auto">
          <tr>
            <td><img src="resources/images/ke15.gif" width="864" height="5" /></td>
          </tr>
          <tr>
            <td><table width="864" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#dfdfdf">
                <tr>
                  <td width="856" bgcolor="#FFFFFF"><table width="85%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:5px">
                      <tr>
                        <td>日期:
                          <input id="cdate" name="cdate" value="<!--{$data.cdate}-->" type="text" readonly="readonly"></td>
                          <td>页面:
                          <select id="part" name="part">
                          		<option value="1" <!--{if $part==1}-->selected="selected"<!--{/if}-->>学校大事记</option>
                          		<option value="2" <!--{if $part==2}-->selected="selected"<!--{/if}-->>接受资助</option>
                          		<option value="3" <!--{if $part==3}-->selected="selected"<!--{/if}-->>升国旗</option>
                          </select>
                          </td>
                      </tr>
                      <tr>
                        <td height="40"><img src="resources/images/ico02.gif" align="absmiddle" /><span class="b10"><strong>M 学校综合信息</strong></span></td>
                      </tr>
                      <tr>
                        <td height="1" background="resources/images/cj21.gif"></td>
                      </tr>
                    </table>
                    <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin:15px auto 15px auto" >
                      <tr>
                        <td width="150" height="30" align="right" bgcolor="#FFFFFF" class="b07"><table border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="5"><img src="resources/images/cj132.gif" /></td>
                              <td bgcolor="#D0E7CD" class="b18">学校大事记:</td>
                              <td width="8"><img src="resources/images/cj131.gif" /></td>
                            </tr>
                          </table></td>
                      </tr>
                      <tr>
                        <td height="30" align="right" bgcolor="#FFFFFF"><span class="b15">领导视察</span></td>
                        <td align="left" bgcolor="#FFFFFF" class="b15"><textarea name="m0"   cols="50" rows="4" class="b11" id="m0"><!--{$data.m0}--></textarea></td>
                      </tr>
                      <tr>
                        <td height="30" align="right" bgcolor="#FFFFFF"><span class="b15">顶新基金会</span></td>
                        <td align="left" bgcolor="#FFFFFF" class="b15"><textarea name="m1" cols="50" rows="4" class="b11" id="m1"><!--{$data.m1}--></textarea></td>
                      </tr>
                      <tr>
                        <td height="30" align="right" bgcolor="#FFFFFF"><span class="b15">其他单位</span></td>
                        <td align="left" bgcolor="#FFFFFF" class="b15"><textarea name="m2" cols="50" rows="4" class="b11" id="m2"><!--{$data.m2}--></textarea></td>
                      </tr>
                      
                      </table>
                      
                    
                   
                    <table width="45%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin:10px auto 10px auto ">
                      <tr>
                        <td width="23%" height="30" align="center"><a href="#" class="submitForm"><img src="resources/images/ni.gif" width="66" height="19" /></a></td>
                        <td width="23%" align="center"><a class="resetForm" style="cursor: pointer; cursor; hand\9;"><img src="resources/images//nii.gif" width="66" height="19" /></a></td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td><img src="resources/images/ke14.gif" width="864" height="5" /></td>
          </tr>
        </table>
      </form></td>
  </tr>
  <tr>
    <td><img src="resources/images/bgc03.gif" width="960" height="20" /></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="b04">
  <tr>
    <td height="80">&nbsp;</td>
  </tr>
</table>
</body>
</html>
